<script type="text/javascript">
/**
* Sends an MSN message
*
* @param string Target MSN handle
*
* @return boolean false
*/
var userAgent = navigator.userAgent.toLowerCase();
var is_opera = ((userAgent.indexOf('opera') != -1) || (typeof(window.opera) != 'undefined'));
var is_saf = ((userAgent.indexOf('applewebkit') != -1) || (navigator.vendor == 'Apple Computer, Inc.'));
var is_webtv = (userAgent.indexOf('webtv') != -1);
var is_ie = ((userAgent.indexOf('msie') != -1) && (!is_opera) && (!is_saf) && (!is_webtv));
function SendMSNMessage(name)
{
 if (!is_ie)
 {
 alert("The MSN functions only work when launched from Internet Explorer (MSIE)");
 return false;
 }
 else
 {
 MsgrObj.InstantMessage(name);
 return false;
 }
}

/**
* Adds an MSN Contact (requires MSN)
*
* @param string MSN handle
*
* @return boolean false
*/
function AddMSNContact(name)
{
 if (!is_ie)
 {
 alert("The MSN functions only work when launched from Internet Explorer (MSIE)");
 return false;
 }
 else
 {
 MsgrObj.AddContact(0, name);
 return false;
 }
}
</script>
<?php
$type = $_GET["type"];
switch ($type) {
	case "yahoo":
		yahoo();
		break;
	case "aim":	
		aim();
		break;
	case "icq":
		icq();
		break;
	case "skype":
		skype();
		break;
	case "msn":
		msn();
		break;
	case "email":
		email();
		break;}
function yahoo() {
//	ymsgr:sendIM?leanhtuanart81
	$username = $_GET["user"];
	$yahoo = $_GET["yahoo"];
	?>
	<table width="100%" cellspacing="1" cellpadding="6" border="0" align="center" class="tborder">
<tbody>
<tr>
	<td align="center" class="panelsurround">
	
	<div class="panel">
		<div align="left">
		<div class="fieldset">
			<span style="float: right;"><img border="0" alt="Online Status" src="http://opi.yahoo.com/online?u=<?php echo $yahoo?>&m=g&t=2"/></span>
			<img alt="" src="images/im_yahoo.gif"/>
		Bạn muốn gửi 1 tin nhắn MSN tới <a target="_blank" href="profile.php?u=<?php echo $username?>"><strong><?php echo $username?></strong></a> (<strong dir="ltr"><?php echo $yahoo?></strong>)
		</div>
		
		<div class="fieldset"><a onclick="window.close(); return true;" target="_blank" href="http://members.yahoo.com/interests?.oc=t&.kw=<?php echo $yahoo?>&.sb=1">Xem thông tin của <span dir="ltr"><?php echo $yahoo?></span></a></div>
		
		<div class="fieldset"><a href="ymsgr:sendIM?<?php echo $yahoo?>">Gửi <span dir="ltr"><?php echo $yahoo?></span>tin nhắn</a></div>
		
		</div>
	</div>
	</td>
</tr>
</tbody></table>
	<?php
}
function email() {
	$username = $_GET["user"];
	$yahoo = $_GET["yahoo"];
	?>
	<table width="100%" cellspacing="1" cellpadding="6" border="0" align="center" class="tborder">
<tbody>
<tr>
	<td align="center" class="panelsurround">
	
	
	
<form enctype="multipart/form-data" class="form-validate" id="emailForm" name="emailForm" method="post" action="http://gen.vn/index.php?option=com_contact&task=submit&Itemid=67">

	<table width="100%" cellspacing="0" cellpadding="0" border="0" class="formcontac">
			<tbody>
			<tr>
				<td nowrap="" height="27" class="ColTitle">Tên công ty</td>
				<td class="SForm"> </td>
				<td class="SForm1">
					<input type="text" value="" name="name" size="29" onkeyup="initTyper(this)" class="SForm" style=""/>
				</td>
			</tr>
			<tr>
			    <td nowrap="" height="26" class="ColTitle">Địa chỉ</td>
			    <td class="SForm"> </td>
			    <td class="SForm1"><input type="text" value="" name="address" size="29" class="SForm" style=""/></td>
		    </tr>
		    <tr>
				<td nowrap="" height="27" class="ColTitle">Nguời đại diện</td>
				<td class="SForm"> </td>
				<td class="SForm1">
					<input type="text" value="" name="daidien" size="29" onkeyup="initTyper(this)" class="SForm" style=""/>
				</td>
			</tr>
			<tr>
				<td nowrap="" height="27" class="ColTitle">Điện thoại</td>
				<td class="SForm"> </td>
				<td class="SForm1">
					<input type="text" value="" name="phone" size="29" onkeyup="initTyper(this)" class="SForm" style=""/>
				</td>
			</tr>
			  <tr>
				<td width="35" nowrap="" height="24" class="ColTitle">Email</td>
				<td class="SForm"> </td>
				<td class="SForm1">
				<input type="text" value="" name="youremail" size="29" class="SForm" style=""/>			    </td>
			</tr>			
			<tr>
				<td width="35" nowrap="" class="ColTitle">Website</td>
				<td class="SForm"> </td>
				<td class="SForm1">
				<input type="text" value="" name="website" size="29" onkeyup="initTyper(this)" class="SForm" style=""/>				</td>
			</tr>

		</tbody></table>
		<div class="adword-title2 fl">
		<label>Nội dung</label>
	</div>
	<div class="adword-nav2 fl">
		<table width="100%" cellspacing="0" cellpadding="0" border="0">
			<tbody><tr>
			<td width="100"/>
			<td>
				<table cellspacing="0" cellpadding="0" border="0" align="right">
				<tbody><tr>
				<td nowrap="" class="ColTitle1">Gõ tiếng việt:</td>
				<td nowrap="" class="SForm">
				<input type="radio" name="optInput" value="0" class="SForm" onfocus="setTypingMode(0)"/>Off
				<input type="radio" name="optInput" value="1" class="SForm" onfocus="setTypingMode(1)"/>Telex
				<input type="radio" name="optInput" value="2" class="SForm" onfocus="setTypingMode(2)"/>VNI
				<input type="radio" name="optInput" value="3" class="SForm" onfocus="setTypingMode(3)"/>VIQR
				</td>
				</tr>
				</tbody></table>
			</td>
			</tr>
			<tr>
				<td align="left" colspan="2" class="SForm">
                  <textarea rows="12" name="text" cols="12" onkeyup="initTyper(this)" class="inputbox required" style="width: 500px;"/></td>
			</tr>
			<tr><td height="32" colspan="2" class="SForm"><input type="button" value="Gửi thông tin" name="send" class="button validate" onclick="CheckSubmit()"/><input type="reset" value="Xóa thông tin" name="B2" class="SForm"/></td></tr>
		</tbody></table>
	</div>
	<input type="hidden" value="com_contact" name="option"/>
	<input type="hidden" value="contact" name="view"/>
	<input type="hidden" value="1" name="id"/>
	<input type="hidden" value="submit" name="task"/>
	
</form>	
	
	
	
	<div class="panel">
		<div align="left">
		<div class="fieldset">
			<span style="float: right;"><img border="0" alt="Online Status" src="http://opi.yahoo.com/online?u=<?php echo $yahoo?>&m=g&t=2"/></span>
			<img alt="" src="images/im_yahoo.gif"/>
		Bạn muốn gửi 1 tin nhắn MSN tới <a target="_blank" href="profile.php?u=<?php echo $username?>"><strong><?php echo $username?></strong></a> (<strong dir="ltr"><?php echo $yahoo?></strong>)
		</div>
		
		<div class="fieldset"><a onclick="window.close(); return true;" target="_blank" href="http://members.yahoo.com/interests?.oc=t&.kw=<?php echo $yahoo?>&.sb=1">Xem thông tin của <span dir="ltr"><?php echo $yahoo?></span></a></div>
		
		<div class="fieldset"><a href="ymsgr:sendIM?<?php echo $yahoo?>">Gửi <span dir="ltr"><?php echo $yahoo?></span>tin nhắn</a></div>
		
		</div>
	</div>
	</td>
</tr>
</tbody></table>
	<?php
}
function skype() {
	$username = $_GET["user"];
	$skype = $_GET["skype"];	
	?>
	<table width="100%" cellspacing="1" cellpadding="6" border="0" align="center" class="tborder">
<tbody>
<tr>
	<td align="center" class="panelsurround">
	<div class="panel">
		<div align="left">

		<table cellspacing="6" cellpadding="0" border="0">
		<tbody><tr>
			<td><img alt="Skype" class="inlineimg" src="images/im_skype.gif"/></td>
			<td style="padding: 0px;" class="fieldset" colspan="3">Bạn đã gửi tin nhắn Skype tới <a target="_blank" href="profile.php?u=<?php echo $username?>"><strong><?php echo $username?></strong></a> (<strong dir="ltr"><?php echo $skype?></strong>)</td>
		</tr>
		<tr>
			<td style="border: 1px inset ; color: black; background-color: white; text-align: center;" colspan="4">
				<a target="_blank" href="http://www.skype.com"><img border="0" alt="Online Status" src="http://mystatus.skype.com/<?php echo $skype?>.png"/></a>
			</td>
		</tr>
		<tr valign="bottom">
			<td><a onclick="return skypeCheck();" href="skype:<?php echo $skype?>?userinfo"><img border="0" alt="Xem thông tin Skype của người này" src="images/skype/skype_info.gif"/></a></td>
			<td class="smallfont"><a onclick="return skypeCheck();" href="skype:<?php echo $skype?>?userinfo">Xem thông tin Skype của người này</a></td>
			<td><a onclick="return skypeCheck();" href="skype:<?php echo $skype?>?add"><img border="0" alt="Thêm người này vào danh sách skype của bạn" src="images/skype/skype_addcontact.gif"/></a></td>
			<td class="smallfont"><a onclick="return skypeCheck();" href="skype:<?php echo $skype?>?add">Thêm người này vào danh sách skype của bạn</a></td>
		</tr>
		<tr valign="bottom">
			<td><a onclick="return skypeCheck();" href="skype:<?php echo $skype?>?call"><img border="0" alt="Khởi động chat voice với  Skype  " src="images/skype/skype_callstart.gif"/></a></td>
			<td class="smallfont"><a onclick="return skypeCheck();" href="skype:<?php echo $skype?>?call">Khởi động chat voice với  Skype </a></td>
			<td><a onclick="return skypeCheck();" href="skype:<?php echo $skype?>?chat"><img border="0" alt="Khởi động chat với Skype" src="images/skype/skype_message.gif"/></a></td>
			<td class="smallfont"><a onclick="return skypeCheck();" href="skype:<?php echo $skype?>?chat">Khởi động chat với</a></td>
		</tr>
		<tr valign="bottom">
			<td><a onclick="return skypeCheck();" href="skype:<?php echo $skype?>?voicemail"><img border="0" alt="Leave voicemail using Skype" src="images/skype/skype_voicemail.gif"/></a></td>
			<td class="smallfont"><a onclick="return skypeCheck();" href="skype:<?php echo $skype?>?voicemail">Leave voicemail using Skype</a></td>
			<td><a onclick="return skypeCheck();" href="skype:<?php echo $skype?>?sendfile"><img border="0" alt="Gửi tài liệu với Skype" src="images/skype/skype_fileupload.gif"/></a></td>
			<td class="smallfont"><a onclick="return skypeCheck();" href="skype:<?php echo $skype?>?sendfile">Gửi tài liệu(file) với Skype</a></td>
		</tr>
		<tr>
			<td class="fieldset" colspan="4">Chức năng này cần cài đặt<a target="_blank" href="http://www.skype.com">Skype.</a></td>
		</tr>
		</tbody></table>
				
		</div>
	</div>
	</td>
</tr>
</tbody></table>
	<?php
}

function msn() {
	$username = $_GET["user"];
	$msn = $_GET["msn"];
	?>
	<table width="100%" cellspacing="1" cellpadding="6" border="0" align="center" class="tborder">
<tbody>
<tr>
	<td align="center" class="panelsurround">
	<object id="MsgrObj" height="0" width="0" codetype="application/x-oleobject" classid="clsid:B69003B3-C55E-4B48-836C-BC5946FC3B28"/></object>
	<div class="panel">
		<div align="left">
		
		<div class="fieldset">
			<img alt="" src="images/im_msn.gif"/>
			Gửi tin nhắn MSN tới <a target="_blank" href="profile.php?u=<?php echo $username?>"><strong><?php echo $username?></strong></a> <span style="white-space: nowrap;">(<strong dir="ltr"><?php echo $msn?></strong>)</span>
		</div>
		
		<div class="fieldset"><a onclick="AddMSNContact('<?php echo $msn?>'); return false;" href="#">Thêm mới <span dir="ltr"><?php echo $msn?></span> Tới danh sách của bạn</a></div>
		
		<div class="fieldset"><a onclick="SendMSNMessage('<?php echo $msn?>'); return false;" href="#">Gửi<span dir="ltr"><?php echo $msn?></span> tin nhắn </a></div>
		
		<div class="fieldset">
		Xin chú ý những chức năng này yêu cầu rằng bạn logged vào MSN Messenger or Windows Messenger. Bạn sẽ không có khả năng để gửi thông điệp tới địa chỉ email mà Bạn logged vào trong MSN/Windows Messenger      
		</div>
				
		</div>
	</div>
	</td>
</tr>
</tbody></table>
	<?php
}

function aim() {
	$username = $_GET["user"];
	$aim = $_GET["aim"];
	?>
<table width="100%" cellspacing="1" cellpadding="6" border="0" align="center" class="tborder">
<tbody>
<tr>
	<td align="center" class="panelsurround">
	<div class="panel">
		<div align="left">
		
		<div class="fieldset">
			<img alt="" src="images/im_aim.gif"/>
			Bạn muốn gửi 1 tin nhắn MSN tới <a target="_blank" href="profile.php?u=<?php echo $username?>"><strong><?php echo $username?></strong></a> (<strong dir="ltr"><?php echo $aim?></strong>)
		</div>
		
		<div class="fieldset"><a href="aim:addbuddy?screenname=<?php echo $aim?>">Thêm<span dir="ltr"><?php echo $aim?></span> tới danh sách của bạn</a></div>
		
		<div class="fieldset"><a href="aim:goim?screenname=<?php echo $aim?>&message=Hi.+Are+you+there?">Gửi <span dir="ltr"><?php echo $aim?></span>Tin nhắn</a></div>
		
		<div class="fieldset">
				Xin chú ý những chức năng này yêu cầu rằng bạn có AOL Instant Messenger được cài đặt trên máy tính của bạn 
		</div>
		
		</div>
	</div>
	</td>
</tr>
</tbody></table>
	<?php
}
?>
